package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PopulationZhuxaioMapper;
import com.ruoyi.system.domain.PopulationZhuxaio;
import com.ruoyi.system.service.IPopulationZhuxaioService;
import com.ruoyi.common.core.text.Convert;

/**
 * 户口注销Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-15
 */
@Service
public class PopulationZhuxaioServiceImpl implements IPopulationZhuxaioService 
{
    @Autowired
    private PopulationZhuxaioMapper populationZhuxaioMapper;

    /**
     * 查询户口注销
     * 
     * @param id 户口注销主键
     * @return 户口注销
     */
    @Override
    public PopulationZhuxaio selectPopulationZhuxaioById(Long id)
    {
        return populationZhuxaioMapper.selectPopulationZhuxaioById(id);
    }

    /**
     * 查询户口注销列表
     * 
     * @param populationZhuxaio 户口注销
     * @return 户口注销
     */
    @Override
    public List<PopulationZhuxaio> selectPopulationZhuxaioList(PopulationZhuxaio populationZhuxaio)
    {
        return populationZhuxaioMapper.selectPopulationZhuxaioList(populationZhuxaio);
    }

    /**
     * 新增户口注销
     * 
     * @param populationZhuxaio 户口注销
     * @return 结果
     */
    @Override
    public int insertPopulationZhuxaio(PopulationZhuxaio populationZhuxaio)
    {
        populationZhuxaio.setCreateTime(DateUtils.getNowDate());
        return populationZhuxaioMapper.insertPopulationZhuxaio(populationZhuxaio);
    }

    /**
     * 修改户口注销
     * 
     * @param populationZhuxaio 户口注销
     * @return 结果
     */
    @Override
    public int updatePopulationZhuxaio(PopulationZhuxaio populationZhuxaio)
    {
        return populationZhuxaioMapper.updatePopulationZhuxaio(populationZhuxaio);
    }

    /**
     * 批量删除户口注销
     * 
     * @param ids 需要删除的户口注销主键
     * @return 结果
     */
    @Override
    public int deletePopulationZhuxaioByIds(String ids)
    {
        return populationZhuxaioMapper.deletePopulationZhuxaioByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除户口注销信息
     * 
     * @param id 户口注销主键
     * @return 结果
     */
    @Override
    public int deletePopulationZhuxaioById(Long id)
    {
        return populationZhuxaioMapper.deletePopulationZhuxaioById(id);
    }
}
